USE [jaxdug]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Presentation_Speaker]') AND parent_object_id = OBJECT_ID(N'[dbo].[Presentation]'))
ALTER TABLE [dbo].[Presentation] DROP CONSTRAINT [FK_Presentation_Speaker]
GO

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Presentation_DateCreated]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Presentation] DROP CONSTRAINT [DF_Presentation_DateCreated]
END

GO

USE [jaxdug]
GO

/****** Object:  Table [dbo].[Presentation]    Script Date: 08/29/2012 22:06:37 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Presentation]') AND type in (N'U'))
DROP TABLE [dbo].[Presentation]
GO

USE [jaxdug]
GO

/****** Object:  Table [dbo].[Presentation]    Script Date: 08/29/2012 22:06:37 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Presentation](
	[PresentationId] [int] IDENTITY(1,1) NOT NULL,
	[SpeakerId] [int] NOT NULL,
	[Name] [varchar](256) NOT NULL,
	[Description] [varchar](max) NOT NULL,
	[DateCreated] [datetime] NOT NULL,
 CONSTRAINT [PK_Presentation] PRIMARY KEY CLUSTERED 
(
	[PresentationId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Presentation]  WITH CHECK ADD  CONSTRAINT [FK_Presentation_Speaker] FOREIGN KEY([SpeakerId])
REFERENCES [dbo].[Speaker] ([SpeakerId])
GO

ALTER TABLE [dbo].[Presentation] CHECK CONSTRAINT [FK_Presentation_Speaker]
GO

ALTER TABLE [dbo].[Presentation] ADD  CONSTRAINT [DF_Presentation_DateCreated]  DEFAULT (getdate()) FOR [DateCreated]
GO


